package com.controller;

import com.service.P_userService;
import com.util.P_register;
import com.util.P_user;
import com.util.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class P_userController {
    @Resource
    P_userService p_userService;
    @RequestMapping("/p_login")
    public Result<?> Login(@RequestBody P_user p_user){
        return p_userService.login(p_user);
    }
    @RequestMapping("/p_register")
    public Result<?> Register(@RequestBody P_register p_register){
        return p_userService.register(p_register);
    }
    @RequestMapping("/p_repassword")
    public Result<?> UpdatePassword(@RequestBody P_user p_user){
        return p_userService.updatePassword(p_user);
    }
}
